Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validate that ASCII Metadata values contain only printable ASCII Characters #11696

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

CoolTomatos
Copy link

To tackle grpc/grpc-go#468, in grpc/grpc-go#4886, a stricter validation on ASCII Metadata values was introduced to throw if the value contains any non-printable ASCII characters, that is characters outside of the range 0x20 to 0x7E.

The current grpc-java behavior regarding that is:

  • Any non ASCII character is silently replaced with ? when putting the entry into the Metadata instance.
  • Any ASCII character is kept and marshaled as it is, this include non-printable ones like \t for example.

This pull request fixes the inconsistent behavior among grpc-java and grpc-go and closes #11679.

Notice that with this pull request, previously passing ASCII Metadata values, will now observe IllegalArgumentExceptions therefore this is a breaking change.

…acter the same way grpc-go validates the Metadata.

closes grpc#11679
Copy link

linux-foundation-easycla bot commented Nov 15, 2024

CLA Signed


The committers listed above are authorized under a signed CLA.

@CoolTomatos CoolTomatos marked this pull request as draft November 15, 2024 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Metadata: Header value validation
1 participant